package com.fuyun.microservice.codec.msg;


import com.fuyun.microservice.codec.PacketType;
import com.fuyun.microservice.utils.BufferUtil;
import lombok.Data;

/**
 * 广播消息
 */
@Data
public class BroadRequestMessage extends Message {

    public BroadRequestMessage(){
        Header header=new Header();
        header.setCommandId(PacketType.BROADREQUEST.getCommandId());
        header.setSequenceNo(BufferUtil.getSequenceNo());
        super.setHeader(header);
    }

    /**
     * 广播消息类型
     */
    private int type;

    /**
     * 是否需要应答
     * 0:否 1:是
     */
    private byte shouldAck;

    /**
     * 主键
     */
    private String topic;

    /**
     * 消息内容
     */
    private String body;
}
